/**
 * Dropdown 组件的主题配置
 * 
 * 基于企业级设计规范 (Dropdown.json) 的完整配置
 * 下拉菜单组件样式定义
 */

import type { ComponentToken } from 'antd/es/dropdown/style';

// ========== 设计 Token 常量 ==========

/**
 * 层级相关 Token
 */
const Z_INDEX_TOKENS = {
  zIndexPopup: 1050,
} as const;

/**
 * 间距相关 Token
 */
const SPACING_TOKENS = {
  paddingBlock: 4,
} as const;

/**
 * 箭头相关 Token
 */
const ARROW_TOKENS = {
  arrowSize: 4,
  arrowOffset: 16,
} as const;

/**
 * Dropdown 完整主题配置
 */
export const dropdownThemeConfig: Partial<ComponentToken> = {
  // ========== 层级配置 ==========
  zIndexPopup: Z_INDEX_TOKENS.zIndexPopup,

  // ========== 间距配置 ==========
  paddingBlock: SPACING_TOKENS.paddingBlock,
};

export const getDropdownTheme = (
  customConfig?: Partial<ComponentToken>
): Partial<ComponentToken> => {
  return {
    ...dropdownThemeConfig,
    ...customConfig,
  };
};

export type { ComponentToken as DropdownComponentToken } from 'antd/es/dropdown/style';

